package com.mcxx.modules.statistics.dao.read;

import com.mcxx.modules.statistics.entity.MemberInfoEntity;
import com.mcxx.modules.statistics.entity.StatisDataItemEntity;
import com.mcxx.modules.statistics.param.StatisParam;
import com.yinhai.ta404.component.org.orguser.area.entity.TaAreaPo;
import com.yinhai.ta404.module.mybatis.mapper.Ta404SupportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface StatisDataItemReadDao extends Ta404SupportMapper {
    List<StatisDataItemEntity> queryStatisItem(@Param("statisticSql")String statisticSql);

    List<StatisDataItemEntity> getStatistics(List<String> areaCodes, String month, String businessType,
                                             String statisItemCode, String povertyType);

    List<StatisDataItemEntity> queryStatisticItems(StatisParam param);

    void updateStatistic(StatisDataItemEntity statistic);

    void delSonAreaStatistics(String areaCode, String month, String businessType, String statisItemCode,
                              String povertyType);

    void addStatistics(@Param("statisDataItems")List<StatisDataItemEntity> statisDataItems);

    List<StatisDataItemEntity> getStatisAccumulative(String businessType, String statisItemCode, String month,
                                                     String firstMonth, String areaCode, String povertyType);

    List<Map<String,String>> queryStaticsItemSpecial(Map<String ,String> params);

    List<Map<String, String>> queryLastOrderData(@Param("familyIds") List<String> familyIds, @Param("month") String month, @Param("bizType") String bizType);

    List<MemberInfoEntity> getFamilyMemberByFamilyIdsAndOrderIds(@Param("familyIds") List<String> familyIds, @Param("orderIds") List<String> orderIds);

    List<TaAreaPo> getSuperLevelAreaCode(String areaCode);

    String getSuperLevelByAreaCode(String areaCode);
}
